# tile types
F = 'Farm'
M = 'Monestary'
R = 'Road'
C = 'City'
T = 'Town'
P = 'Pendant'
D = 'Don\'t Care'

# cardinal directions
N = 'North'
S = 'South'
E = 'East'
W = 'West'

# feature status values
OPEN = 'Open'
CLOSED = 'Closed'

# tile definitions: number of type, 3x3 definition, tile id 
TILE_0  = (2, ((F, F, F), (F, M, F), (F, T, F)), 0)
TILE_1  = (4, ((F, F, F), (F, M, F), (F, F, F)), 1)
TILE_2  = (1, ((C, C, C), (C, P, C), (C, C, C)), 2)
TILE_3  = (4, ((F, R, F), (F, R, C), (F, R, F)), 3)
TILE_4  = (5, ((F, C, F), (F, F, F), (F, F, F)), 4)
TILE_5  = (2, ((F, F, F), (C, P, C), (F, F, F)), 5)
TILE_6  = (1, ((F, C, F), (F, C, F), (F, C, F)), 6)
TILE_7  = (3, ((F, F, F), (C, F, C), (F, F, F)), 7)
TILE_8  = (2, ((F, F, F), (F, F, C), (F, C, F)), 8)
TILE_9  = (3, ((F, C, F), (F, R, R), (F, R, F)), 9)
TILE_10 = (3, ((F, R, F), (R, R, C), (F, F, F)), 10)
TILE_11 = (3, ((F, R, F), (R, T, C), (F, R, F)), 11)
TILE_12 = (2, ((P, C, F), (C, F, F), (F, F, F)), 12)
TILE_13 = (3, ((C, C, F), (C, F, F), (F, F, F)), 13)
TILE_14 = (2, ((P, C, F), (C, R, R), (F, R, F)), 14)
TILE_15 = (3, ((C, C, F), (C, R, R), (F, R, F)), 15)
TILE_16 = (1, ((P, C, C), (C, C, C), (F, F, F)), 16)
TILE_17 = (3, ((C, C, C), (C, C, C), (F, F, F)), 17)
TILE_18 = (2, ((P, C, C), (C, T, C), (F, R, F)), 18)
TILE_19 = (1, ((C, C, C), (C, T, C), (F, R, F)), 19)
TILE_20 = (8, ((F, R, F), (F, R, F), (F, R, F)), 20)
TILE_21 = (9, ((F, F, F), (R, R, F), (F, R, F)), 21)
TILE_22 = (4, ((F, F, F), (R, T, R), (F, R, F)), 22)
TILE_23 = (1, ((F, R, F), (R, T, R), (F, R, F)), 23)

ORIGINAL_SET = range(0, 24)

AVAILABLE_SETS = {'Original Set' : ORIGINAL_SET}

# global defs
def TILE_INFO(land):
        for i in range(0, len(land)):
            for j in range(0, len(land[i])):
                print GET_TYPES(land[i][j]),
            print 
        print

def GET_TYPES(part):
    if part == F:
        return 'F'
    elif part == M:
        return 'M'
    elif part == R:
        return 'R'
    elif part == C:
        return 'C'
    elif part == T:
        return 'T'
    elif part == P:
        return 'P'
    elif part == D:
        return 'D'
    else:
        return ' '

if __name__ == '__main__':
    INIT_PILE = []
    for num in ORIGINAL_SET:
        tile = eval('TILE_' + str(num))
        TILE_INFO(tile[1])















